---
id: 655773f8b8b5db9fc6d0ae76
title: Step 20
challengeType: 20
dashedName: step-20
---

# --description--

To keep track of the visited nodes, you need a list of all the nodes in the graph. Once a node is visited, it will be removed from that list.

Now, replace the `pass` keyword with a variable named `unvisited` and assign it an empty list.

# --hints--

You should have a variable called `unvisited`.

```js
({ test: () =>
  {
    const shortest_path = __helpers.python.getDef(code, "shortest_path");
    const {function_body} = shortest_path;    
    assert(function_body.match(/unvisited\s*=/));
  }
})
```

Your `unvisited` variable should be an empty list.

```js
({ test: () =>
  {
    const shortest_path = __helpers.python.getDef(code, "shortest_path");
    const {function_body} = shortest_path;    
    assert(function_body.match(/unvisited\s*=\s*\[\s*\]/));
  }
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
my_graph = {
    'A': [('B', 3), ('D', 1)],
    'B': [('A', 3), ('C', 4)],
    'C': [('B', 4), ('D', 7)],
    'D': [('A', 1), ('C', 7)]
}

def shortest_path(graph, start):
    pass
--fcc-editable-region--
```
